package com.walking.orderservice.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author walking
 * 公众号：编程大道
 */
@RestController
@RequestMapping("order")
public class OrderController {
    @PostMapping("/create/{productId}")
    public Map<String, Object> createOrder(@PathVariable String productId) {
        Map<String, Object> result = new HashMap<String, Object>();
        result.put("code", "AAAAAAA");
        result.put("msg", "下单成功");
        result.put("productId", productId);
        return result;
    }
}
